package com.hurl.waguji.base;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionContext;

public class Struts2Utils {
	public static HttpServletRequest getRquest(){
		return (HttpServletRequest)ActionContext.getContext().get(ServletActionContext.HTTP_REQUEST);		
	}
	public static HttpServletResponse getResponse(){
		return (HttpServletResponse)ActionContext.getContext().get(ServletActionContext.HTTP_RESPONSE);		
	}
	public static Map<String,Object> getSessionAttributes(){
		return ActionContext.getContext().getSession();		
	}
	public static Map<String,Object> getApplicationAttributes(){
		return ActionContext.getContext().getApplication();		
	}
}
